"""
38 - Dars. Sinfning sozlamalari.
"""
class shaxs:

    def__init__(self, name):
        self.name = name
        self.__age = 20

    def malumot_1(self):
        print(f'Ism: {self.name}, Yosh: {self.__age}')

    def yoshni_olish(self):
        return self.__age + 10

    def quyish(self, value):
        if value in range(1, 101):
            self.__age = value
        else:
            print('Yosh xato kiritilgan.')

    @property
    def age(self):
        return self.__age


    @age.setter
    def age(self, value):
        if value in range(1, 101):
            self.__age = value
        else:
            print('Yosh xato kiritilgan.')
